home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Educational / Sphere / Source / DrawPoly.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-12  |  8.2 KB  |  248 lines

  1. /* DrawPoly.c generated from DrawPoly.psw
  2.    by unix pswrap V1.009  Wed Apr 19 17:50:24 PDT 1989
  3.  */
  4.  
  5. #include <dpsclient/dpsfriends.h>
  6. #include <string.h>
  7.  
  8. #line 1 "DrawPoly.psw"
  9. #line 10 "DrawPoly.c"
  10. void DrawPoly3(float x1, float y1, float x2, float y2, float x3, float y3)
  11. {
  12.   typedef struct {
  13.     unsigned char tokenType;
  14.     unsigned char topLevelCount;
  15.     unsigned short nBytes;
  16.  
  17.     DPSBinObjGeneric obj0;
  18.     DPSBinObjGeneric obj1;
  19.     DPSBinObjReal obj2;
  20.     DPSBinObjReal obj3;
  21.     DPSBinObjGeneric obj4;
  22.     DPSBinObjReal obj5;
  23.     DPSBinObjReal obj6;
  24.     DPSBinObjGeneric obj7;
  25.     DPSBinObjReal obj8;
  26.     DPSBinObjReal obj9;
  27.     DPSBinObjGeneric obj10;
  28.     DPSBinObjGeneric obj11;
  29.     DPSBinObjGeneric obj12;
  30.     } _dpsQ;
  31.   static const _dpsQ _dpsStat = {
  32.     DPS_DEF_TOKENTYPE, 13, 108,
  33.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  34.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  35.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x1 */
  36.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y1 */
  37.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  38.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x2 */
  39.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y2 */
  40.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  41.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x3 */
  42.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y3 */
  43.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  44.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 22},    /* closepath */
  45.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},    /* stroke */
  46.     }; /* _dpsQ */
  47.   _dpsQ _dpsF;    /* local copy  */
  48.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  49.   char pad[3];
  50.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  51.   _dpsF = _dpsStat;    /* assign automatic variable */
  52.  
  53.   _dpsP[2].val.realVal = x1;
  54.   _dpsP[3].val.realVal = y1;
  55.   _dpsP[5].val.realVal = x2;
  56.   _dpsP[6].val.realVal = y2;
  57.   _dpsP[8].val.realVal = x3;
  58.   _dpsP[9].val.realVal = y3;
  59.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,108);
  60.   if (0) *pad = 0;    /* quiets compiler warnings */
  61. }
  62. #line 10 "DrawPoly.psw"
  63.  
  64. #line 65 "DrawPoly.c"
  65. void DrawPoly3s(float x1, float y1, float x2, float y2, float x3, float y3, float gray)
  66. {
  67.   typedef struct {
  68.     unsigned char tokenType;
  69.     unsigned char topLevelCount;
  70.     unsigned short nBytes;
  71.  
  72.     DPSBinObjReal obj0;
  73.     DPSBinObjGeneric obj1;
  74.     DPSBinObjReal obj2;
  75.     DPSBinObjReal obj3;
  76.     DPSBinObjGeneric obj4;
  77.     DPSBinObjReal obj5;
  78.     DPSBinObjReal obj6;
  79.     DPSBinObjGeneric obj7;
  80.     DPSBinObjReal obj8;
  81.     DPSBinObjReal obj9;
  82.     DPSBinObjGeneric obj10;
  83.     DPSBinObjGeneric obj11;
  84.     DPSBinObjGeneric obj12;
  85.     } _dpsQ;
  86.   static const _dpsQ _dpsStat = {
  87.     DPS_DEF_TOKENTYPE, 13, 108,
  88.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: gray */
  89.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  90.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x1 */
  91.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y1 */
  92.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  93.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x2 */
  94.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y2 */
  95.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  96.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x3 */
  97.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y3 */
  98.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  99.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 22},    /* closepath */
  100.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 66},    /* fill */
  101.     }; /* _dpsQ */
  102.   _dpsQ _dpsF;    /* local copy  */
  103.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  104.   char pad[3];
  105.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  106.   _dpsF = _dpsStat;    /* assign automatic variable */
  107.  
  108.   _dpsP[2].val.realVal = x1;
  109.   _dpsP[3].val.realVal = y1;
  110.   _dpsP[5].val.realVal = x2;
  111.   _dpsP[6].val.realVal = y2;
  112.   _dpsP[8].val.realVal = x3;
  113.   _dpsP[9].val.realVal = y3;
  114.   _dpsP[0].val.realVal = gray;
  115.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,108);
  116.   if (0) *pad = 0;    /* quiets compiler warnings */
  117. }
  118. #line 21 "DrawPoly.psw"
  119.  
  120. #line 121 "DrawPoly.c"
  121. void DrawPoly4(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
  122. {
  123.   typedef struct {
  124.     unsigned char tokenType;
  125.     unsigned char topLevelCount;
  126.     unsigned short nBytes;
  127.  
  128.     DPSBinObjGeneric obj0;
  129.     DPSBinObjGeneric obj1;
  130.     DPSBinObjReal obj2;
  131.     DPSBinObjReal obj3;
  132.     DPSBinObjGeneric obj4;
  133.     DPSBinObjReal obj5;
  134.     DPSBinObjReal obj6;
  135.     DPSBinObjGeneric obj7;
  136.     DPSBinObjReal obj8;
  137.     DPSBinObjReal obj9;
  138.     DPSBinObjGeneric obj10;
  139.     DPSBinObjReal obj11;
  140.     DPSBinObjReal obj12;
  141.     DPSBinObjGeneric obj13;
  142.     DPSBinObjGeneric obj14;
  143.     DPSBinObjGeneric obj15;
  144.     } _dpsQ;
  145.   static const _dpsQ _dpsStat = {
  146.     DPS_DEF_TOKENTYPE, 16, 132,
  147.     {DPS_LITERAL|DPS_INT, 0, 0, 0},
  148.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  149.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x1 */
  150.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y1 */
  151.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  152.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x2 */
  153.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y2 */
  154.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  155.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x3 */
  156.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y3 */
  157.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  158.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x4 */
  159.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y4 */
  160.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  161.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 22},    /* closepath */
  162.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 167},    /* stroke */
  163.     }; /* _dpsQ */
  164.   _dpsQ _dpsF;    /* local copy  */
  165.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  166.   char pad[3];
  167.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  168.   _dpsF = _dpsStat;    /* assign automatic variable */
  169.  
  170.   _dpsP[2].val.realVal = x1;
  171.   _dpsP[3].val.realVal = y1;
  172.   _dpsP[5].val.realVal = x2;
  173.   _dpsP[6].val.realVal = y2;
  174.   _dpsP[8].val.realVal = x3;
  175.   _dpsP[9].val.realVal = y3;
  176.   _dpsP[11].val.realVal = x4;
  177.   _dpsP[12].val.realVal = y4;
  178.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,132);
  179.   if (0) *pad = 0;    /* quiets compiler warnings */
  180. }
  181. #line 34 "DrawPoly.psw"
  182.  
  183. #line 184 "DrawPoly.c"
  184. void DrawPoly4s(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, float gray)
  185. {
  186.   typedef struct {
  187.     unsigned char tokenType;
  188.     unsigned char topLevelCount;
  189.     unsigned short nBytes;
  190.  
  191.     DPSBinObjReal obj0;
  192.     DPSBinObjGeneric obj1;
  193.     DPSBinObjReal obj2;
  194.     DPSBinObjReal obj3;
  195.     DPSBinObjGeneric obj4;
  196.     DPSBinObjReal obj5;
  197.     DPSBinObjReal obj6;
  198.     DPSBinObjGeneric obj7;
  199.     DPSBinObjReal obj8;
  200.     DPSBinObjReal obj9;
  201.     DPSBinObjGeneric obj10;
  202.     DPSBinObjReal obj11;
  203.     DPSBinObjReal obj12;
  204.     DPSBinObjGeneric obj13;
  205.     DPSBinObjGeneric obj14;
  206.     DPSBinObjGeneric obj15;
  207.     } _dpsQ;
  208.   static const _dpsQ _dpsStat = {
  209.     DPS_DEF_TOKENTYPE, 16, 132,
  210.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: gray */
  211.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 150},    /* setgray */
  212.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x1 */
  213.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y1 */
  214.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 107},    /* moveto */
  215.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x2 */
  216.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y2 */
  217.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  218.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x3 */
  219.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y3 */
  220.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  221.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: x4 */
  222.     {DPS_LITERAL|DPS_REAL, 0, 0, 0},    /* param: y4 */
  223.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 99},    /* lineto */
  224.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 22},    /* closepath */
  225.     {DPS_EXEC|DPS_NAME, 0, DPSSYSNAME, 66},    /* fill */
  226.     }; /* _dpsQ */
  227.   _dpsQ _dpsF;    /* local copy  */
  228.   register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();
  229.   char pad[3];
  230.   register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;
  231.   _dpsF = _dpsStat;    /* assign automatic variable */
  232.  
  233.   _dpsP[2].val.realVal = x1;
  234.   _dpsP[3].val.realVal = y1;
  235.   _dpsP[5].val.realVal = x2;
  236.   _dpsP[6].val.realVal = y2;
  237.   _dpsP[8].val.realVal = x3;
  238.   _dpsP[9].val.realVal = y3;
  239.   _dpsP[11].val.realVal = x4;
  240.   _dpsP[12].val.realVal = y4;
  241.   _dpsP[0].val.realVal = gray;
  242.   DPSBinObjSeqWrite(_dpsCurCtxt,(char *) &_dpsF,132);
  243.   if (0) *pad = 0;    /* quiets compiler warnings */
  244. }
  245. #line 46 "DrawPoly.psw"
  246.  
  247.  
  248.